package com.ponhu.ea2.stockcenter.provider.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 虚拟类库存表
 * @TableName ph_stock_inventory_unreal
 */
@TableName(value ="ph_stock_inventory_unreal")
@Data
@Accessors(chain = true)
public class StockInventoryUnreal implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商品ID
     */
    private Long goodsId;

    /**
     * 货品ID
     */
    private Long inventoryId;

    /**
     * 货品编码
     */
    private String inventoryCode;

    /**
     * 可售库存数
     */
    private Integer saleStockNum;

    /**
     * 乐观锁版本号
     */
    private Integer version;

    /**
     * 状态(1:初始化完成;0:初始化未完成)
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE, update = "NOW()")
    private Date updateTime;

    /**
     * 是否逻辑删除
     */
    @TableLogic
    private Boolean deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}